package com.example.demo1031;

public class Test {

    public static void main(String[] args) {
        MyThread myThread = new MyThread();
        myThread.start();
        myThread.setName("线程one");
        MyThread myThread1 = new MyThread();
        myThread1.start();
        myThread1.setName("线程two");
        for (int i = 0; i < 10; i++) {
           System.out.println(Thread.currentThread().getName()+"main---------"+i);
        }
    }
}
